﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TT : MonoBehaviour
{
	public static TT Instance;
	private void Awake() {
		Instance = this;
	}
	Queue<string> queue = new Queue<string>();

	// Start is called before the first frame update
	void Start() {

	}

	public void GetText(string s) {
		queue.Enqueue(s);
	}

	// Update is called once per frame
	void Update() {
		transform.SetAsLastSibling();

		if (queue.Count > 0) {
			string s = queue.Dequeue();
			GetComponent<Text>().text += s;
		}

	}
}
